﻿using System.Web.Mvc;
using FormAuthentication.Practice.Areas.Admin;
using FormAuthentication.Practice.Areas.Customer;

namespace FormAuthentication.Practice
{
    public class FilterConfig
    {
        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(new HandleErrorAttribute());

            filters.Add(new CustomizeAuthorizeAttribute(customerArea: "Customer",
                customerLogin: CustomerAreaRegistration.LoginUrl, adminArea: "Admin",
                adminLogin: AdminAreaRegistration.LoginUrl));
        }
    }
}
